<div class="bm mdcp">
	<div class="itemtitle s_clear">
		<h1>{lang mod_option_subject}</h1>
		<div class="ttp cl">
			<a href="{$cpscript}?mod=modcp&action=thread&op=thread{$forcefid}" hidefocus="true" class="brw{if $_G[gp_action] == 'thread' && $op == 'thread'} otp{/if}">{lang mod_option_subject_forum}</a>
			<a href="{$cpscript}?mod=modcp&action=thread&op=post{$forcefid}" hidefocus="true" class="brw{if $_G[gp_action] == 'thread' && $op == 'post'} otp{/if}">{lang mod_option_subject_delete}</a>
			<a href="{$cpscript}?mod=modcp&action=recyclebin{$forcefid}" hidefocus="true" class="brw{if $_G[gp_action] == 'recyclebin'} otp{/if}">{lang mod_option_subject_recyclebin}</a>
		</div>	
	</div>
	<script type="text/javascript" src="{$_G[setting][jspath]}forum_calendar.js?{VERHASH}"></script>
	<div class="datalist">
		<form method="post" autocomplete="off" action="{$cpscript}?mod=modcp&action=$_G[gp_action]&op=$op">
			<input type="hidden" name="do" value="search">
			<input type="hidden" name="formhash" value="{FORMHASH}">
			<div class="exfm">
				<table cellspacing="0" cellpadding="0">
					<tr>
						<th width="15%">{lang mod_option_selectforum}:</th>
						<td width="35%">
							<span class="ftid">
								<select name="fid" id="fid" class="ps" width="180">
									<option value="">{lang modcp_select_forum}</option>
									<!--{loop $modforums[list] $id $name}-->
									<option value="$id" {if $id == $_G[fid]}selected{/if}>$name</option>
									<!--{/loop}-->
								</select>
							</span>
						</td>
						<th width="15%">{lang modcp_posts_type}:</th>
						<td width="35%">
							<span class="ftid">
								<select name="threadoption" id="threadoption" class="ps" width="180">
									<option value="0" $threadoptionselect[0]>{lang all}</option>
									<option value="1" $threadoptionselect[1]>{lang modcp_posts_threadfirst}</option>
									<option value="2" $threadoptionselect[2]>{lang modcp_posts_threadreply}</option>
								</select>
							</span>				
						</td>		
					</tr>		
					<tr>
						<th>{lang modcp_posts_author}:</th>
						<td><input type="text" class="px" size="20" value="$result[users]" name="users" style="width: 180px"/></td>
						<th>{lang modcp_posts_dateline_range}:</th>
						<td><input type="text" class="px" size="10" value="$result[starttime]" name="starttime" onclick="showcalendar(event, this)"/> {lang modcp_posts_to} 
							<!--{if $_G['adminid'] == 1}-->
								<input type="text" class="px" size="10" value="$result[endtime]" name="endtime" onclick="showcalendar(event, this)"/>
							<!--{else}-->
								<input type="text" class="px" size="10" value="$result[endtime]" name="endtime" readonly disabled /> 
								<!--{if $_G['adminid'] == 2}-->
									<br />{lang modcp_posts_week_2}
								<!--{elseif $_G['adminid'] == 3}-->
									<br />{lang modcp_posts_week_1}
								<!--{/if}-->
								
							<!--{/if}-->
						 </td>
					</tr>		
					<tr>
						<th>{lang modcp_posts_keyword}:</th>
						<td><input type="text" class="px" size="20" value="$result[keywords]" name="keywords" style="width: 180px"/></td>
						<th>{lang modcp_posts_ip}:</th>
						<td><input type="text" class="px" value="$result[useip]" name="useip" style="width: 180px" /></td>
					</tr>		
					<tr>
						<td></td>
						<td colspan="3">
							<button value="true" id="searchsubmit" name="searchsubmit" class="pn" type="submit"><strong>{lang submit}</strong></button> 
						</td>
					</tr>
				</table>	
			</div>
		</form>
	</div>
	<!--{if $error == 1}-->
		<p style="padding: 4px; color: red">{lang modcp_posts_error_1}</p>
	<!--{elseif $error == 2}-->
		<p style="padding: 4px; color: red">{lang modcp_posts_error_2}</p>
	<!--{elseif $error == 3}-->
		<p style="padding: 4px; color: red">{lang modcp_posts_error_3}</p>
	<!--{elseif $error == 4}-->
		<p style="padding: 4px; color: red">{lang modcp_posts_error_4}</p>
	<!--{elseif $do=='list' && empty($error)}-->
		<div class="c_header"><h2>{lang modcp_posts_search}</h2></div>
		<div id="threadlist" class="threadlist datalist">
			<form method="post" autocomplete="off" name="moderate" id="moderate" action="{$cpscript}?mod=modcp&action=$_G[gp_action]&op=$op">
			<input type="hidden" name="formhash" value="{FORMHASH}" />
			<input type="hidden" name="fid" value="$_G[fid]" />
			<input type="hidden" name="do" value="delete" />
			<table cellspacing="0" cellpadding="0" class="dt">
				<thead>
					<tr>
						<th class="c">&nbsp;</th>
						<th>&nbsp;</th>
						<th width="10%">{lang forum}</th>
						<th width="15%">{lang author}</th>
					</tr>
				</thead>
				<!--{loop $postlist $post}-->
				<tbody>
					<tr>
						<td>{if $_G['group']['allowmassprune']}<input class="pc" type="checkbox" name="delete[]" value="$post[pid]" />{/if}</td>
						<td>
							{lang modcp_posts_thread}: &nbsp;<a target="_blank" href="forum.php?mod=redirect&goto=findpost&pid=$post[pid]&ptid=$post[tid]&modthreadkey=$post[modthreadkey]">$post[tsubject]</a><br />
							<span class="xg1">$post[message]</span>
						</td>
						<td>
							<a href="forum.php?mod=forumdisplay&fid=$post[fid]">$post['forum']</a>
						</td>
						<td>
								<!--{if $post['authorid'] && $post['author']}-->
									<a href="home.php?mod=space&uid=$post[authorid]" target="_blank">$post[author]</a>
								<!--{else}-->
									<a href="home.php?mod=space&uid=$post[authorid]" target="_blank">{lang anonymous}</a>
								<!--{/if}-->
								<br/>
								$post[dateline]
						</td>
					</tr>
				</tbody>
				<!--{/loop}-->
				
				<!--{if $postlist && $_G['group']['allowmassprune']}-->
					<tr class="bbn">
						<td>{if $_G['group']['allowmassprune']}<label for="chkall"><input type="checkbox" name="chkall" id="chkall" onclick="checkall(this.form, 'delete')" class="pc"/> {lang delete_check}</label>{/if}</td>
						<td colspan="3"><button value="true" id="deletesubmit" name="deletesubmit" class="pn" type="submit"><strong>{lang delete}</strong></button><label for="nocredit"><input type="checkbox" class="pc" name="nocredit" id="nocredit" value="1" checked> {lang modcp_posts_member_credits}</label></td>
					</tr>
				<!--{/if}-->
			</table>
			<!--{if $multipage}--><div class="pgs">$multipage</div><!--{/if}-->
			</form>
		</div>
	<!--{/if}-->
</div>
<script type="text/javascript" reload="1">
	simulateSelect('fid');
	simulateSelect('threadoption');
</script>